package com.ruoyi.client.pojo.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "购物车新增表单", description = "添加商品到购物车的请求参数")
public class CartAddForm {

    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty(value = "商品ID", required = true, example = "1001")
    private Long goodsId;

    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量必须大于0")
    @ApiModelProperty(value = "商品数量（1-999）", required = true, example = "2")
    private Long count;
}